<template>
	<div>
		<!-- xpert导航栏 -->
		<xpertNavBar :statusTab="statusTab" />
		<div style="height: 150px; width: 100%" class=""></div>
		<!-- Notifications -->
		<div class="notifications f f-a-c f-j-b">
			<div class="leftNotifications">Notifications</div>
			<div @click="setting" class="rigtNotifications f f-a-c">
				<img src="/src/assets/user/setting.png" class="setting" alt="" />
				Notifications setting
			</div>
		</div>
		<!-- Systematic -->
		<div class="systematic f f-a-c">
			<div class="tic hand">
				Systematic
				<div class="num">3</div>
			</div>
			<div class="order hand">
				Order
				<div class="num">3</div>
			</div>
			<div class="collect hand">
				Collect
				<div class="num">3</div>
			</div>
		</div>
		<div class="list">
			<div v-for="(item, index) in 10" :key="index" class="listItem f f-j-c f-d-c">
				<div class="content" :class="{ actText: index >= 3 }">Congrats, your xx has been approved!</div>
				<div class="time" :class="{ actText: index >= 3 }">Now</div>
			</div>
			<div class="hand">
				<div class="example-pagination-block f f -a-c f-j-c">
					<el-pagination @size-change="sizeChange" @current-change="currentChange" layout="prev, pager, next" :total="1000" />
				</div>
			</div>
		</div>
		<xpertTabbar />
	</div>
</template>

<script setup>
	import { ref, onMounted } from "vue";
	import xpertTabbar from "@/components/tabBar/xpertTabbar.vue";
	import xpertNavBar from "@/components/navBar/xpertNavBar.vue";
	import router from "@/router/index.js";
	import ButtonDiffuse from "@/components/Button/ButtonDiffuse.vue";
	let statusTab = ref(1);
	onMounted(() => {
		window.addEventListener("scroll", handleScroll);
	});

	// 切换分页
	const sizeChange = e => {
		console.log(e, "1111111");
	};
	// 切换分页
	const currentChange = e => {
		console.log(e, "1111111");
	};
	// 去设置
	const setting = () => {
		router.push("/BuyNotificationsSetting");
	};
	// 这个是当头部导航栏滑倒下面时给tabr加个背景
	const handleScroll = () => {
		const scrollTop = document.documentElement.scrollTop;
		if (scrollTop > 0) {
			statusTab.value = 2;
		} else {
			statusTab.value = 1;
		}
	};
</script>
<style scoped>
	@import "./index.scss";
</style>
